package com.my.blogapi.vo.param;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.sql.ResultSet;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;
    private String msg;
    private boolean success;
    private Object data;

    public static Result success(Object data){
        return new Result(200,"success",true,data);
    }

    public static Result fail(Integer code,String msg){
        return new Result(code,msg,false,null);
    }
}
